package com.atguigu.mpdemo1010.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
public class User {
   //@TableId(type = IdType.AUTO)   //自动增长策略，用的时候需要在设计表中也是自动增长策略
    private Long id;

    private String name;
    private Integer age;
    private String email;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;  //创建时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;  //修改时间

    @Version
    @TableField(fill = FieldFill.INSERT)
    private Integer version;//版本号


    @TableLogic
    private Integer deleted;
}
